package org.halo.trade.data.sina;


public class Level2_ZJLXNetInfo
{
	public double[] net_mf = new double[4];
	public double sum;
	public double pricePercent;
	public String symbol;

	public long time;

	public double getMainNetIn()
	{
		double main_net_in = net_mf[0] + net_mf[1];
		return main_net_in;
	}
	
	public double getExtremeNetIn()
	{
		return net_mf[0];
	}

	public double getMainNetInRate()
	{
		return getMainNetIn() / sum;
	}
	

	public void print()
	{
		System.out.println("===============================");
		System.out.println(symbol);
		if (time > 0)
		{
			System.out.println(Utils.msToStr(time) + "：");
		}
		for (int j = 0; j < 4; j++)
		{
			System.out.print(net_mf[j] + "\t");
		}
		System.out.println();
		if (sum > 0)
		{
			for (int j = 0; j < 4; j++)
			{
				System.out.print(Utils.doubleToString(net_mf[j] * 100.0 / sum, 2) + "%\t");
			}
			System.out.println();
		}

		// double total = 0;
		// for (int j = 0; j < 4; j++)
		// {
		// total += (mf[0][j] + mf[1][j]);
		// }
		// System.out.println("净流入率：" + netamount / total * 100);

		// double main_buy = mf[0][0] + mf[0][1];
		// double main_sell = mf[1][0] + mf[1][1];
		//
		// double main_net_in = main_buy - main_sell;
		// double percent_main_net_in = main_net_in * 100.0 / total;
		//
		// System.out.println("主力净流入率：" + percent_main_net_in);
	}

}
